﻿<UserControl x:Class="devtm.Editor.TypeSelector.ObjectViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:e="clr-namespace:devtm.Editor.TypeSelector"
             mc:Ignorable="d" 
             d:DesignHeight="122" d:DesignWidth="347">
    <UserControl.Resources>
        <DataTemplate DataType="{x:Type e:ValueParameter}">
            <Grid Margin="20,0,0,0" HorizontalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" MinWidth="140" HorizontalAlignment="Left" Content="{Binding Name}" Visibility="{Binding ViewText}" />
                <ComboBox Grid.Column="0" MinWidth="140"  FontWeight="Bold" HorizontalAlignment="Left" ItemsSource="{Binding Parameters }" DisplayMemberPath="Name" SelectedItem="{Binding MyParameter}" Visibility="{Binding ViewCombo}" />
                <TextBox Grid.Column="1" MinWidth="220" Text="{Binding Value}" Visibility="{Binding TextValueVisible}" />
                <ComboBox Grid.Column="1" MinWidth="220" Text="{Binding Value}" Visibility="{Binding ComboValueVisible}" ItemsSource="{Binding ComboItemsSource}" SelectedItem="{Binding Value}" />
            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    <Grid>
        
        <TreeView 
            Name="treeView1" />
    </Grid>
</UserControl>
